home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_03
/
cmenu.exe
/
CMENU.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-01-05
|
2KB
|
85 lines
/************************************************************
* Program: CMENU/RMENU Menu Compiler
* Written by: Leor Zolman, 11/90
*
* Module: cmenu.h -- master header file
*
* This include file contains definitions common to both
* the cmenu and rmenu programs.
************************************************************/
#include <stdio.h>
#define VERSION "1.3 (1/5/92)"
/************** System-dependent stuff: *********************/
#if __STDC__ || XENIX
# define Void void
#else
# define Void int
#endif
/******************** Maximum sizes/lengths: ****************/
#define MAX_PATH 30
#define MAX_MENUS 20
#define MAX_NEST 2
#define MAX_TXTWID 74
#define MAX_ITEMS 20
#define MAX_CMD 130
#define MAX_HELP 79
#define MAX_NAME 20
/****************** Magic constants: ************************/
#define DEFAULT 0
#define YES 1
#define NO 2
#define ERROR (-1)
/******************** Nextitem types: ***********************/
#define NXT_FIRST 1
#define NXT_LAST 2
#define NXT_NEXT 3
#define NXT_DIRECT 4
/********************** Action types: ***********************/
#define ACT_NONE 0
#define ACT_CMND 1
#define ACT_LMENU 2
#define ACT_EMENU 3
#define ACT_EXIT 4
/*********************** typedefs: **************************/
typedef char BOOL;
typedef struct menu {
char title[MAX_TXTWID];
char path[MAX_PATH];
int nitems;
char align;
int columns;
int spacing;
int widest;
char escape;
} MENU;
typedef struct item {
char text[MAX_TXTWID];
char path[MAX_PATH];
char action[MAX_CMD];
char help[MAX_HELP];
char pre_clear,
post_clear,
prompt;
char acttyp;
int lmenunum;
char nextcode;
int nextitem;
} ITEM;